
<!DOCTYPE html>
<html lang="en">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>必发彩票-趋势</title>
    <script src="js/jquery-1.10.1.min.js"></script>
    <script src="js/md5.js"></script>
    <script src="js/layer.js"></script>
    <script src="js/public.js"></script>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
            text-decoration: none;
        }
        body,html{
            width: 100%;
            height: 100%;
            overflow: auto;
            font-family: '微软雅黑';
        }
        table{padding:10px 10px 20px 10px;display: none}
        table tr th {
            border:1px solid #adadad;
            background: #f4f3f8
        }
        table td{border:1px solid #adadad;background: #fff;text-align: center;}
        table td span{display: inline-block;width: 20px;height: 20px;border-radius: 50%;color: #fff;text-align: center;line-height: 20px;font-size: 10px}
        table td span.B{background: #537CEF}
        table td span.R{background: #DE4A53}
        table td span.G{background: #1DB08D}
        tbody{
            width: 100%;
            min-height: 200px;
            max-height: 280px;
            overflow-y: scroll;
        }
        .nav{margin: 0 10px}
        .nav span{display: inline-block;width: 32%;height: 30px;line-height: 30px;text-align: center;cursor: pointer}
        .nav span.hover{color: #fe5e19;border-bottom: 1px solid #fe5e19;}
    </style>
</head>

<body>
    <div class="nav">
        
    </div>
    <div class="list">
        <table  width="100%" border="0" cellspacing="1" cellpadding="0" class="first" style="display:table">
            <thead>
            
            </thead>
            <tbody>
                
            </tbody>
        
            
        </table>
        <table  width="100%" border="0" cellspacing="1" cellpadding="0" class="two">
            <thead>
            
            </thead>
            <tbody>
                
            </tbody>
        
            
        </table>
        <table  width="100%" border="0" cellspacing="1" cellpadding="0" class="three" >
            <thead>
            
            </thead>
            <tbody>
                
            </tbody>
        
            
        </table>
    </div>
<script src="js/public.js"></script>
<script>
 
    $(function(){
        
        var type = parent.$('#lotteryName').data('type');
        var buyObj = jsonObj;
        var uid = getCookie('uid');

        var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
        buyObj.type = type;
        // 获取彩票信息
        if(type == 'bflhc' || type == 'xglhc'){
            
            $('.nav').html('<span class="hover">号码</span>'+
                                   '<span>总和</span>'+
                                   '<span>特码</span>');
            $ajax(//号码
                url+'xglhc_trend_num',
                'post',
                buyObj,
                function(data){
                    console.log(data)
                    $('.first thead').html('<tr>'+
                            '<th>期号</th>'+
                            '<th>正一</th>'+
                            '<th>正二</th>'+
                            '<th>正三</th>'+
                            '<th>正四</th>'+
                            '<th>正五</th>'+
                            '<th>正六</th>'+
                            '<th>特码</th>'+
                        '</tr>')
                    var res = ''
                    for(var i = 0,iL = data.data.length;i<iL;i++){
                        res+= '<tr>'+
                                '<td>'+data.data[i].issue+'</td>'+
                       

                            '<td> <span class='+data.data[i].haoma[0].color+' >'+data.data[i].haoma[0].number+'</span> '+data.data[i].haoma[0].sign+'</td>'+
                            '<td> <span class='+data.data[i].haoma[1].color+' >'+data.data[i].haoma[1].number+'</span> '+data.data[i].haoma[1].sign+'</td>'+
                            '<td> <span class='+data.data[i].haoma[2].color+' >'+data.data[i].haoma[2].number+'</span> '+data.data[i].haoma[2].sign+'</td>'+
                            '<td> <span class='+data.data[i].haoma[3].color+' >'+data.data[i].haoma[3].number+'</span> '+data.data[i].haoma[3].sign+'</td>'+
                            '<td> <span class='+data.data[i].haoma[4].color+' >'+data.data[i].haoma[4].number+'</span> '+data.data[i].haoma[4].sign+'</td>'+
                            '<td> <span class='+data.data[i].haoma[5].color+' >'+data.data[i].haoma[5].number+'</span> '+data.data[i].haoma[5].sign+'</td>'+
                            '<td> <span class='+data.data[i].haoma[6].color+' >'+data.data[i].haoma[6].number+'</span> '+data.data[i].haoma[6].sign+'</td>'+
                        
                                
                        '</tr>'
                    }
                    $('.first tbody').html(res)
                    
                },
                function(data){
                    layer.msg(data.msg);
                }
            )
            $ajax(//总和
                url+'xglhc_trend_sum',
                'post',
                buyObj,
                function(data){
                    
                    $('.two thead').html('<tr>'+
                            '<th>期号</th>'+
                            '<th>总数</th>'+
                            '<th>单双</th>'+
                            '<th>大小</th>'+
                        '</tr>')
                    var res = ''
                    for(var i = 0,iL = data.data.length;i<iL;i++){
                        res+= '<tr>'+
                                '<td>'+data.data[i].issue+'</td>'+
                                '<td>'+data.data[i].zs+'</td>'+
                                '<td>'+data.data[i].ds+'</td>'+
                                '<td>'+data.data[i].dx+'</td>'+
                            '</tr>'
                    }
                    $('.two tbody').html(res)
                    
                },
                function(data){
                    layer.msg(data.msg);
                }
            )
            $ajax(//特码
                url+'tema',
                'post',
                buyObj,
                function(data){
                    
                    $('.three thead').html('<tr>'+
                            '<th>期号</th>'+
                            '<th>单双</th>'+
                            '<th>大小</th>'+
                            '<th>和单双</th>'+
                            '<th>和大小</th>'+
                            '<th>大小尾</th>'+
                            '<th>波色</th>'+
                        '</tr>')
                    var res = ''
                    for(var i = 0,iL = data.data.length;i<iL;i++){
                        res+= '<tr>'+
                                '<td>'+data.data[i].issue+'</td>'+
                                '<td>'+data.data[i].ds+'</td>'+
                                '<td>'+data.data[i].dx+'</td>'+
                                '<td>'+data.data[i].hds+'</td>'+
                                '<td>'+data.data[i].hdx+'</td>'+
                                '<td>'+data.data[i].dxw+'</td>'+
                                '<td>'+data.data[i].sb+'</td>'+
                            '</tr>'
                    }
                    $('.three tbody').html(res)
                    
                },
                function(data){
                    layer.msg(data.msg);
                }
            )
            
        }else if(type == 'bjpk10' || type == 'yfsc'){

            $ajax(
                url+'trend_all',
                'post',
                buyObj,
                function(data){
                    console.log(data.data)
                    $('.first thead').html('<tr>'+
                            '<th>期号</th>'+
                            '<th>冠亚和</th>'+
                            '<th>冠亚和单双</th>'+
                            '<th>冠亚和大小</th>'+
                            '<th>1龙虎</th>'+
                            '<th>2龙虎</th>'+
                            '<th>3龙虎</th>'+
                            '<th>4龙虎</th>'+
                            '<th>5龙虎</th>'+
                        '</tr>')
                    var res = ''
                    for(var i = 0,iL = data.data.length;i<iL;i++){
                        res+= '<tr>'+
                                '<td>'+data.data[i].issue+'</td>'+
                                '<td>'+data.data[i].gyh+'</td>'+
                                '<td>'+data.data[i].gyhDS+'</td>'+
                                '<td>'+data.data[i].gyhDX+'</td>'+
                                '<td>'+data.data[i].lh1+'</td>'+
                                '<td>'+data.data[i].lh2+'</td>'+
                                '<td>'+data.data[i].lh3+'</td>'+
                                '<td>'+data.data[i].lh4+'</td>'+
                                '<td>'+data.data[i].lh5+'</td>'+
                            '</tr>'
                    }
                    $('.first tbody').html(res)
                },
                function(data){
                    layer.msg(data.msg);
                }
            )
        }else if(type == 'cqssc' || type == 'yfssc'){

            $ajax(
                url+'trend_all',
                'post',
                buyObj,
                function(data){
                    
                    $('.first thead').html('<tr>'+
                            '<th>期号</th>'+
                            '<th>总和单双</th>'+
                            '<th>总和大小</th>'+
                            '<th>前三</th>'+
                            '<th>中三</th>'+
                            '<th>后三</th>'+
                        '</tr>')
                    var res = ''
                    for(var i = 0,iL = data.data.length;i<iL;i++){
                        res+= '<tr>'+
                                '<td>'+data.data[i].issue+'</td>'+
                                '<td>'+data.data[i].zhDS+'</td>'+
                                '<td>'+data.data[i].zhDX+'</td>'+
                                '<td>'+data.data[i].qs+'</td>'+
                                '<td>'+data.data[i].zs+'</td>'+
                                '<td>'+data.data[i].hs+'</td>'+
                            '</tr>'
                    }
                    $('.first tbody').html(res)
                },
                function(data){
                    layer.msg(data.msg);
                }
            )
        }

        $('.nav span').click(function(){
            var index = $(this).index()
            $(this).addClass('hover').siblings().removeClass('hover');
            $('.list table').eq(index).show().siblings().hide()
        })
        
    })


</script>
</body>

</html>
